package edu.cuit.zhuyimeng.uaa.api.controller;

import edu.cuit.zhuyimeng.framework.common.result.CommonResult;
import edu.cuit.zhuyimeng.uaa.api.dto.LoginDTO;
import edu.cuit.zhuyimeng.uaa.api.dto.RegisterDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("uaa-service")
public interface VerificationApiController {

    /**
     * 登录
     *
     * @return 登录结果
     */
    @PostMapping("/login")
    CommonResult<String> doLogin(@RequestBody LoginDTO loginDTO);

    /**
     * 注销
     *
     * @return 注销结果
     */
    @PostMapping("/logout")
    CommonResult<?> doLogout();

    /**
     * 注册
     *
     * @return 注册结果
     */
    @PostMapping("/register")
    CommonResult<?> doRegister(@RequestBody RegisterDTO registerDTO);

}
